package com.technician.exceptionHandler;

import com.technician.model.enums.HttpStatusEnum;

public class GlobalSystemException extends RuntimeException{

    private int code;

    private String message;

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public GlobalSystemException(HttpStatusEnum httpStatusEnum) {
        super(httpStatusEnum.getMessage());
        this.code = httpStatusEnum.getCode();
        this.message = httpStatusEnum.getMessage();
    }
    public GlobalSystemException(int code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

}
